{{--等操作成功时消息提示--}}
<script>
    //操作成功提示消息
    // 判断session中是否有success
    @if(session ()->has ('success'))
        swal({
            title:"{{session ()->get ('success')}}",
            type:'success'//提示框图标
        });
    @endif
</script>

{{--操作失败时的警告消息提示--}}
<script>
    // warning
    @if(session ()->has ('error'))
        swal({
            title:'{{session ()->get ('error')}}',
            type:'error'//提示框图标
        });
    @endif
</script>
<script>
    // warning
    @if(session ()->has ('warning'))
    swal({
        title:'{{session ()->get ('warning')}}',
        type:'warning'//提示框图标
    });
    @endif
</script>
{{--在注册或者登陆时validdata验证不正确的提示消息--}}
<script>
    // 判断session中是否有error
    @if(session ()->has ('error'))
      swal({
          title:"{{session ()->get ('error')}}",
          type:'error'//提示框图标
      });
    @endif
</script>

<script>
    //自动验证提示消息request,异常，消息，抛出异常
    //手册：表单验证->显示验证错误信息
    @if ($errors->any())
       swal({
           title:'@foreach ($errors->all() as $error) {{ $error }} @endforeach',
           type:'error'//提示框图标
       });
    @endif
</script>
